home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Graphismes / 3D / POV-Ray 3.0B5a PPC / POV-Ray 3.0B5a / POVSCN.Scenes / POV3DEMO / DEMO / PRIMITIV.POV < prev    next >
Text File  |  1995-11-08  |  3KB  |  160 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2.  
  3.  
  4. #version 3.0
  5. global_settings { assumed_gamma 2.2 }
  6.  
  7. #include "stage1.inc"
  8.  
  9. #declare Radius =2.5
  10. #declare RowSpace=1.1
  11. #declare ColSpace=1.1
  12. #declare Dist=-3
  13. #declare Row3= 2
  14. #declare Row2=Row3+Radius*RowSpace*2
  15. #declare Row1=Row2+Radius*RowSpace*2
  16. #declare Col1= -Radius*ColSpace*3
  17. #declare Col2= Col1+Radius*ColSpace*2
  18. #declare Col3= Col2+Radius*ColSpace*2
  19. #declare Col4= Col3+Radius*ColSpace*2
  20. #declare Col5= Col4+Radius*ColSpace*2
  21.  
  22. camera {Camera1 translate <0,Row2,-110>}
  23.  
  24. #declare Fade=
  25. texture {
  26.    pigment {
  27.       gradient <1,1,0>
  28.       color_map {
  29.          [0.0 color Green]
  30.          [0.3 color Green]
  31.          [0.5 color Clear]
  32.          [1.0 color Clear]
  33.       }
  34.       rotate z*45
  35.    }
  36.    finish {phong 1}
  37.    scale 5
  38. }
  39.  
  40. #declare Solid=
  41. texture {
  42.    pigment {Green}
  43.    finish {phong 1}
  44. }
  45.  
  46. bicubic_patch { 
  47.    type 1 flatness 0.01 u_steps 4 v_steps 4,
  48.    <0, -1.5, 2>, <1, -1.5, 0>, <2, -1.5, 0>, <3, -1.5, -2>,
  49.    <0, -0.5, 0>, <1, -0.5, 0>, <2, -0.5, 0>, <3, -0.5,  0>,
  50.    <0,  0.5, 0>, <1,  0.5, 0>, <2,  0.5, 0>, <3,  0.5,  0>,
  51.    <0,  1.5, 2>, <1,  1.5, 0>, <2,  1.5, 0>, <3,  1.5, -2>
  52.    texture {Solid}
  53.    rotate    -45*y
  54.    translate <Col1, Row1, Dist>
  55. }
  56.  
  57. blob {
  58.    threshold 0.6
  59.    component 1.0, 1.0, < 0.75,   0,       0>
  60.    component 1.0, 1.0, <-0.375,  0.64952, 0>
  61.    component 1.0, 1.0, <-0.375, -0.64952, 0>
  62.    texture {Solid}
  63.    translate <Col2, Row1, Dist>
  64. }
  65.  
  66. box {
  67.    <-1, -1, -1>, <1, 1, 1>
  68.    texture {Solid}
  69.    rotate <-25, 15, 0>
  70.    translate <Col3, Row1, Dist>
  71. }
  72.  
  73. cone {
  74.    x,0.5,
  75.    -x,1.0
  76.    rotate  y*30
  77.    texture {Solid}
  78.    translate <Col4, Row1, Dist>
  79. }
  80.  
  81. cylinder {
  82.    x,-x,1.0
  83.    rotate  y*30
  84.    texture {Solid}
  85.    translate <Col1, Row2, Dist>
  86. }
  87.  
  88. cubic { 
  89.    //         x*x                + y*y*y + y*y           + z*z  -1 =0
  90.    <0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0.45, 0, 1, 0, 0, 0, 0, 1, 0, -1>
  91.    sturm
  92.    texture {Fade}
  93.    clipped_by{object{UnitBox scale 2.5}}
  94.    bounded_by{clipped_by}
  95.    translate <Col2, Row2, Dist>
  96. }
  97.  
  98. disc {
  99.    <Col3, Row2, Dist>, //center location
  100.    <-1, 3, -2>,        //normal vector  
  101.    1.5,                //radius         
  102.    0.5                 //hole radius (optional)
  103.    texture {Solid}
  104. }
  105.  
  106.  
  107. height_field { 
  108.    gif "plasma3.gif" 
  109.    smooth
  110.    texture {Solid}
  111.    translate <-.5, -.5, -.5>
  112.    scale <4,2,4>
  113.    rotate <-35, -30, 0>
  114.    translate <Col4, Row2, Dist>
  115. }  
  116.  
  117. plane { z, 0
  118.    texture {Fade}
  119.    clipped_by{object{UnitBox scale 3}}
  120.    bounded_by{clipped_by}
  121.    translate <Col1, Row3, Dist>
  122. }  
  123.  
  124. //   x^4 - x^2 + y^2 + z^2 = 0
  125. poly { 4
  126.    < 1,   0,   0,   0,   0,   0,   0,   0,   0, -1,
  127.    0,   0,   0,   0,   0,   0,   0,   0,   0,  0,
  128.    0,   0,   0,   0,   0,   1,   0,   0,   0,  0,
  129.    0,   0,   1,   0,   0>
  130.    sturm
  131.    scale 2
  132.    texture {Solid}
  133.    translate <Col2, Row3, Dist>
  134. }
  135.  
  136. // y - x*x + z*z = 0 
  137. quadric {
  138.    <-1, 0, 1>, <0, 0, 0>, <0, 1, 0>, 0
  139.    texture {Fade}
  140.    clipped_by{object{UnitBox scale 2}}
  141.    bounded_by{clipped_by}
  142.    translate <Col3, Row3, Dist>
  143. }
  144.  
  145. quartic {
  146.    //xxxx         xxyy    xxzz  -2(rr+RR)xx
  147.    <1, 0, 0, 0, 2, 0, 0, 2, 0, -2.5,
  148.    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  149.  
  150.    //yyyy     yyzz  -2(rr-RR)yy
  151.    1, 0, 0, 2, 0    1.5,     0, 0, 0,  0,  
  152.  
  153.    //zzzz   -2(rr+RR)zz    (rr-RR)(rr-RR)
  154.    1, 0,    -2.5,       0, 0.5625>
  155.    texture {Solid}
  156.    rotate -45*x  
  157.    translate <Col4, Row3, Dist>
  158. }
  159.  
  160.